package study;

import com.alibaba.nacos.api.config.annotation.NacosValue;
import com.alibaba.nacos.spring.context.annotation.config.NacosPropertySource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 腾讯课堂搜索【咕泡学院】
 * 官网：www.gupaoedu.com
 * 风骚的Mic 老师
 * create-date: 2020/1/6-16:00
 */
@RestController
//autoRefreshed 表示自动刷新
@NacosPropertySource(dataId = "example",autoRefreshed = true)
public class HelloController {

    //autoRefreshed 表示自动刷新
    @NacosValue(value = "${key:hello world}", autoRefreshed = true)
    private String name;
    @GetMapping("/say")
    public String sayHello(){
        return "say："+name;
    }

}
